package com.lili.collection.core.context.impl;

import com.lili.collection.core.config.InputConfig;
import com.lili.collection.core.config.OutputConfig;
import com.lili.collection.core.config.ProcessConfig;
import com.lili.collection.core.context.Context;
import com.lili.collection.core.handler.IExecValidateHandler;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * 通用上下文实现
 *
 * @author lili
 * @date 2023/3/2 20:28
 */
@Getter
@Setter
public class GenericContext implements Context {

    private InputConfig inputConfig;

    private List<ProcessConfig> processConfigList;

    private OutputConfig outputConfig;

    //强制停止信号
    private volatile boolean stopSignal=false;

    //执行验证处理器
    private IExecValidateHandler validateHandler;

    public GenericContext() {
        this.processConfigList = new ArrayList<>();
    }

    @Override
    public boolean getStopSignal() {
        return stopSignal;
    }
}
